package DAO;
import java.util.Calendar;
import java.util.GregorianCalendar;

import classe.Adherent;
import classe.Utilisateur;

public class AdherentsDao {

		private Adherent[] adherentDB = {
				
				new Adherent ("Fournier", "TOMas", new GregorianCalendar(1988, Calendar.SEPTEMBER, 24).getTime(),"Unknown",007, "boubi","SuperTom","0148526201"),
				new Adherent ("Fyot","BOBO", new GregorianCalendar(1986, Calendar.AUGUST,18).getTime(),"M", 1,"THOMAS","MOTO","0145869525"),
				new Adherent ("ISMAIL", "Bibis", new GregorianCalendar(1992,Calendar.DECEMBER,24).getTime(),"M",3,"42","JESUS","0145869525"),
				new Adherent ("BOUBI", "Momodeste", new GregorianCalendar(1450, Calendar.APRIL,1).getTime(),"M",2, "Modeste","MonCoeur","0145869525"),
				new Adherent("MAHMOUDI", "TAISSA", new GregorianCalendar(1985, Calendar.FEBRUARY,29).getTime(), "M", 4, "EcouteMoi", "ohohoh","0145869525"),
				new Adherent("CHOUPEAU","Grarthur", new GregorianCalendar(1989, Calendar.FEBRUARY,04).getTime(), "M",5,"totoc", "Machete","0145869525")
	};
	
	public Adherent findBykey(int idKey)
	{
			for (Adherent adherent:adherentDB)
				if ((adherent.getIdUtilisateur()==idKey)) return adherent;
		return null;
	}
	
}